/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.yonsei.iwb.sdt.datastructure.rule;

import java.util.Vector;
import edu.yonsei.iwb.sdt.refinement.ConstraintConstructor;
import edu.yonsei.iwb.sdt.refinement.DLConstructors;
import edu.yonsei.iwb.sdt.refinement.ExpandingHistory;
import edu.yonsei.iwb.sdt.refinement.Refinement;

/**
 *
 * @author JDK
 */
public class DecisionRule extends Vector<DecisionRuleComponent>{
    
    private String rule;
    
    private Vector<Refinement> parentRefinement;
    private ExpandingHistory eh;
//    private Vector<String> constraintPart;
//    private Vector<NodeExpressionRuleComponent> nercSet;
    
    public DecisionRule(){
        //empty set
    }
    
    public DecisionRule(DecisionRule olddr, DecisionRuleComponent drc){
        //add old decision rule
        this.addAll(olddr);
        this.add(drc);
    }
    
    
    
    @Override
    public String toString(){
        StringBuilder sb = new StringBuilder();        
        for (int i = 0; i < this.size()-1; i++) {
            String drc = this.get(i).toString();
            sb.append(drc).append(" ").append(DLConstructors.CONJUNCTION).append(" ");
        }
        sb.append(this.lastElement().toString());        
        return sb.toString();
    }
    
//    public Vector<NodeExpressionRuleComponent> getNodeExpressionRuleComponent(){
//        return this.nercSet;
//    }
    
   
   
}
